<template>
    <div>
        <sel-file
                ref="changeImages"
                @callback="specChooseimg"
                :imgNum="num"
                :albumCode="type"
                dialogTitle="选择图片"
                selectType="radio"
                selMaxWidth="300px"
                selMaxHeight="300px"
        ></sel-file>
    </div>
</template>

<script>
	import selFile from '@/components/file/selFile';
	export default {
		name: "changeImage",
      components:{
	      selFile
      },
      props:{
	      albumType:{
	      	type:String,
            default: 'store'
          },
        imgnum:{
	        type:String,
	        default: '1'
        }
      },
      computed:{
		type(){
			return this.albumType
        },
        num(){
         return this.imgnum
        }
      },
      methods:{
			open(){
				this.$refs.changeImages.open();
            },
	      specChooseimg(e){
            if(e.length>0){
            	this.$emit('returnPicture',e[0])
            }
          }
      },
	}
</script>

<style scoped>

</style>